package com.orangelife.mobile.tehui;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.transition.Transition;
import android.widget.FrameLayout;
import android.widget.TextView;

import com.curry.orangelife.mobile.R;
import com.orangelife.mobile.common.activity.OrangeLifeBaseActivity;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 特惠中的Activity
 */
public class TehuiActivity extends OrangeLifeBaseActivity {


    @Bind(R.id.tv_title)
    TextView tvTitle;
    Fragment fragment;


    private String activityID;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tehui2);
        ButterKnife.bind(this);
        initView();
        findView();
    }

    private void findView() {
        FragmentManager fragmentManager=getSupportFragmentManager();
        FragmentTransaction transition=fragmentManager.beginTransaction();
        fragment=new TeHuiFragment2();
        Bundle bundle = new Bundle();
        bundle.putString("activityID",activityID);
        fragment.setArguments(bundle);
        transition.add(R.id.flContent, fragment);
        transition.commit();
    }

    private void initView() {
        tvTitle.setText("天天特惠");
        activityID = getIntent().getStringExtra("id");
    }
}
